package com.yb.livewykt.bean

import com.yb.livewykt.R
import java.util.*

enum class FuBeautyEnum(
    val key: String,
    val actionName: String,
    val actionValue: Float,
    val nameId: Int,
    val iconId: Int
) {

        RESET("reset", "原图", 0f, R.string.origin, R.drawable.ic_reset_white),
        BLURWHIT(
            "blur_white",
            "磨皮",
            FuBeautyNormalParam.sBlurLevel,
            R.string.blur_white,
            R.drawable.ic_blur_white
        ),
        BEAUTYWHITE(
            "beauty_white",
            "美白",
            FuBeautyNormalParam.sColorLevel,
            R.string.mei_bai,
            R.drawable.ic_beauty_white_white_face
        ),
        THINFACE(
            "thin_face",
            "瘦脸",
            FuBeautyNormalParam.sCheekThinning,
            R.string.thin_face,
            R.drawable.ic_thin_face_white
        ),
        THINNOSE(
            "thin_nose",
            "瘦鼻",
            FuBeautyNormalParam.sIntensityNose,
            R.string.thin_nose,
            R.drawable.ic_thin_nose_white
        ),
        BIGEYES(
            "big_eye",
            "大眼",
            FuBeautyNormalParam.sEyeEnlarging,
            R.string.big_eyes,
            R.drawable.ic_big_eyes_white
        );
/*
        RUDDY("ruddy","红润",sRedLevel, R.string.origin,R.drawable.ic_reset_white),
        EYESBRIGHT("eye_bright","亮眼",sEyeBright, R.string.origin,R.drawable.ic_reset_white),
        TOOTHWHITEN("tooth_whiten","美牙",sToothWhiten, R.string.origin,R.drawable.ic_reset_white),
        MICROPOUCH("micro_pouch","去黑眼圈",sMicroPouch, R.string.origin,R.drawable.ic_reset_white),
        MICRONASOLABIALFOLDS("micro_nasolabia","去法令纹",sMicroNasolabialFolds, R.string.origin,R.drawable.ic_reset_white),
        MICROSMILE("micro_smile","微笑嘴角",sMicroSmile, R.string.origin,R.drawable.ic_reset_white),
        MICROCANTHUS("micro_canthus","眼角",sMicroCanthus, R.string.origin,R.drawable.ic_reset_white),
        MICROPHILTRUM("micro_philtrum","人中",sMicroPhiltrum, R.string.origin,R.drawable.ic_reset_white),
        MICROLONGNOSE("micro_long_nose","鼻子长度",sMicroLongNose, R.string.origin,R.drawable.ic_reset_white),
        MICROEYESPACE("micro_eye_space","眼睛间距",sMicroEyeSpace, R.string.origin,R.drawable.ic_reset_w hite),
        MICROEYEROTATE("micro_eye_rotate","眼睛角度",sMicroEyeRotate, R.string.origin,R.drawable.ic_reset_white),
        CHEEKV("cheek_v","V脸",sCheekV, R.string.origin,R.drawable.ic_reset_white),
        CHECKNARROW("cheek_narrow","窄脸",sCheekNarrow, R.string.origin,R.drawable.ic_reset_white),
        CHEEKSMALL("cheek_small","小脸",sCheekSmall, R.string.origin,R.drawable.ic_reset_white),
        INTENSITYCHIN("intensity_chin","下巴",sIntensityChin, R.string.origin,R.drawable.ic_reset_white),
        INTENTSITYFOREHEAD("intensity_forehead","额头",sIntensityForehead, R.string.origin,R.drawable.ic_reset_white),
        INTENTSITYMOUTH("intensity_mouth","嘴形",sIntensityMouth, R.string.origin,R.drawable.ic_reset_white);

 */

    companion object{
        fun getBeautyBodyByFilterType(): ArrayList<Beauty> {
            val values = values()
            val effectEnums: ArrayList<Beauty> = ArrayList(values.size)
            for (value in values) {
                effectEnums.add(value.create())
            }
            return effectEnums
        }

        fun getNormalValue(key: String): Float {
            var value = 0f
            val values = values()
            for (v in values) {
                if (v.key == key) {
                    value = v.actionValue
                    break
                }
            }
            return value
        }

        fun getFuEnum(key: String): FuBeautyEnum {
            val values = values()
            for (v in values) {
                if (v.key == key) {
                    return v
                }
            }
            return RESET
        }
    }
    private fun create(): Beauty  = Beauty(key, name, iconId, nameId)

}